API Documentation
Namespace.h
1 // Namespace.h
3 //
5 
6 namespace nkScripts
7 {
11  class Namespace
12  {
13  public :
14 
24  virtual ~Namespace () ;
25 
26  // Getters
35  virtual Namespace* getNamespace (const nkMemory::StringView& name) const = 0 ;
40  virtual UserType* getUserType (const nkMemory::StringView& name) const = 0 ;
41 
42  // Setters
49  virtual void setVar (const nkMemory::StringView& name, bool value) = 0 ;
56  virtual void setVar (const nkMemory::StringView& name, int value) = 0 ;
63  virtual void setVar (const nkMemory::StringView& name, float value) = 0 ;
70  virtual void setVar (const nkMemory::StringView& name, double value) = 0 ;
77  void setVar (const nkMemory::StringView& name, const char* value) ;
84  virtual void setVar (const nkMemory::StringView& name, const nkMemory::StringView& value) = 0 ;
91  virtual void setVar (const nkMemory::StringView& name, const ScriptObjectReference& value) = 0 ;
99  virtual void setObject (const nkMemory::StringView& name, const nkMemory::StringView& userTypeName, void* value) = 0 ;
106  virtual Namespace* setNamespace (const nkMemory::StringView& name) = 0 ;
113  virtual UserType* setUserType (const nkMemory::StringView& name) = 0 ;
120  virtual Function* setFunc (const nkMemory::StringView& name) = 0 ;
121 
126  virtual void shutdown () = 0 ;
130  virtual void reset () = 0 ;
131  } ;
132 }
nkScripts::Namespace::setUserType
virtual UserType * setUserType(const nkMemory::StringView &name)=0
nkScripts
Encompasses all API of component NilkinsScripts.
Definition: Environment.h:7
nkScripts::Namespace::reset
virtual void reset()=0
nkScripts::Namespace::setVar
virtual void setVar(const nkMemory::StringView &name, const ScriptObjectReference &value)=0
nkScripts::Namespace
Holds information and allow control over a namespace in a scripting environment.
Definition: Namespace.h:12
nkScripts::Namespace::getUserType
virtual UserType * getUserType(const nkMemory::StringView &name) const =0
nkScripts::Namespace::setNamespace
virtual Namespace * setNamespace(const nkMemory::StringView &name)=0
nkScripts::Namespace::setVar
virtual void setVar(const nkMemory::StringView &name, int value)=0
nkScripts::Namespace::Namespace
Namespace(const nkMemory::StringView &name)
nkScripts::Namespace::setVar
void setVar(const nkMemory::StringView &name, const char *value)
nkScripts::Namespace::shutdown
virtual void shutdown()=0
nkScripts::Namespace::setVar
virtual void setVar(const nkMemory::StringView &name, double value)=0
nkScripts::UserType
Represents a user type and all the information and control related.
Definition: UserType.h:27
nkScripts::Namespace::setObject
virtual void setObject(const nkMemory::StringView &name, const nkMemory::StringView &userTypeName, void *value)=0
nkScripts::ScriptObjectReference
A reference over an object in the scripting environment.
Definition: ScriptObjectReference.h:30
nkScripts::Namespace::getName
nkMemory::StringView getName() const
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkScripts::Namespace::setVar
virtual void setVar(const nkMemory::StringView &name, float value)=0
nkScripts::Namespace::setFunc
virtual Function * setFunc(const nkMemory::StringView &name)=0
nkScripts::Namespace::setVar
virtual void setVar(const nkMemory::StringView &name, const nkMemory::StringView &value)=0
nkScripts::Namespace::~Namespace
virtual ~Namespace()
nkScripts::Namespace::setVar
virtual void setVar(const nkMemory::StringView &name, bool value)=0
nkScripts::Namespace::getNamespace
virtual Namespace * getNamespace(const nkMemory::StringView &name) const =0
nkScripts::Function
Holds information, and controls, over a function in a scripting environment.
Definition: Function.h:50